<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>围观学员列表</h5>
        </div>
        <div class="ibox-content">
            <div class="table-responsive">
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th class="text-center" width="8%">ID</th>
                            <th class="text-center" width="30%">旁听人</th>
                            <th class="text-center" width="40%">时间</th>
                            <th class="text-center" width="22%">消费</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                            <td colspan="4" class="text-center">
                                <div class="noDataTipsBox">
                                    <p><span class="c-4e fs16">亲，还没有回答数据~~~</span></p>
                                </div>
                            </td>
                        </tr>
                        <tr th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="attend:${dataMap['list']}">
                            <td class="text-center" th:text="${attend['id']}"></td>
                            <td class="text-center" th:text="${attend['user']['nickname']}"></td>
                            <td class="text-center" th:text="${#strings.substring(attend['createTime'], 0, 16)}"></td>
                            <td class="text-center">
                                <span class="c-master" th:text="${attend['price']}"></span>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <!-- 分页，开始 -->
                <div class="text-center" th:if="${dataMap['pages']} > 1">
                    <nav>
                        <ul class="pager">
                            <li th:if="${dataMap['pageNum']} == 1" class="disabled"><a href="javascript:void(0);"><i class="fa fa-chevron-left"></i> 上一页</a></li>
                            <li th:if="${dataMap['pageNum']} >1"><a href="javascript:void(0);" th:attr="data-page=${dataMap['pageNum']}-1" id="upPage2"><i class="fa fa-chevron-left"></i> 上一页</a></li>
                            <li th:if="${dataMap['pageNum']} == ${dataMap['pages']}" class="disabled"><a href="javascript:void(0);">下一页 <i class="fa fa-chevron-right"></i></a></li>
                            <li th:if="${dataMap['pageNum']} < ${dataMap['pages']}"><a href="javascript:void(0);" th:attr="data-page=${dataMap['pageNum']} + 1" id="nextPage2">下一页 <i class="fa fa-chevron-right"></i></a></li>
                        </ul>
                    </nav>
                </div>
                <!-- 分页，结束 -->
            </div>
        </div>
    </div>
</html>